SpecialAccount.cls
Language: Visual Basic Class
Last Modified: 2020-06-27 1:58:30 PM UTC
File Size: 998 bytes
Last Modified: 2020-06-27 1:58:30 PM UTC
File Size: 998 bytes
http://www.penguinstew.ca/example/ExcelSQLExport/SpecialAccount.cls
VERSION 1.0 CLASS
BEGIN
MultiUse = -1 'True
END
Attribute VB_Name = "SpecialAccount"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = False
Attribute VB_Exposed = False
Public SpecialAccountId As Integer
Public SpecialAccountMonthId As Integer
Public MonthId As Integer
Public Name As String
Public amount As Double
Public rowNumbers As Vector
Public isNew As Boolean
Private Sub Class_Initialize()
Set rowNumbers = New Vector
rowNumbers.SetType 0
End Sub
Public Function ToSQL() As String
ToSQL = "INSERT INTO [SpecialAccounts]([SpecialAccountId],[Name]) VALUES (" & Me.SpecialAccountId & ",'" & Me.Name & "')"
End Function
Public Function ToMonthSql() As String
ToMonthSql = "INSERT INTO [SpecialAccountMonths]([SpecialAccountMonthId],[SpecialAccountId],[MonthId],[Amount]) VALUES (" & Me.SpecialAccountMonthId & "," & Me.SpecialAccountId & "," & Me.MonthId & "," & Me.amount & ")"
End Function
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31